package com.calvin.springcloud.service.user.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.calvin.springcloud.dao.user.UserDao;
import com.calvin.springcloud.model.user.User;
import com.calvin.springcloud.service.user.IUserService;

@Service
public class UserService implements IUserService {
	
	@Autowired
	private UserDao userDao;

	@Override
	public List<User> getUserList() {
		return userDao.selectAllUser();
	}

	@Override
	public User findUser(Long userId, String userName) {
		Map<String,Object> param = new HashMap<String,Object>();
		param.put("userId", userId);
		param.put("userName", userName);
		return userDao.findUser(param);
	}
	
	
	
	

}
